home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xmlextras / nsIDOMSerializer.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  135 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDOMSerializer.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDOMSerializer_h__
  6. #define __gen_nsIDOMSerializer_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIOutputStream; /* forward declaration */
  18.  
  19. class nsIDOMNode; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIDOMSerializer */
  23. #define NS_IDOMSERIALIZER_IID_STR "9fd4ba15-e67c-4c98-b52c-7715f62c9196"
  24.  
  25. #define NS_IDOMSERIALIZER_IID \
  26.   {0x9fd4ba15, 0xe67c, 0x4c98, \
  27.     { 0xb5, 0x2c, 0x77, 0x15, 0xf6, 0x2c, 0x91, 0x96 }}
  28.  
  29. /**
  30.  * The nsIDOMSerializer interface is really a placeholder till the W3C
  31.  * DOM Working Group defines a mechanism for serializing DOM nodes.
  32.  * An instance of this interface can be used to serialize a DOM document
  33.  * or any DOM subtree.
  34.  */
  35. class NS_NO_VTABLE nsIDOMSerializer : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMSERIALIZER_IID)
  39.  
  40.   /**
  41.    * The subtree rooted by the specified element is serialized to
  42.    * a string.
  43.    * 
  44.    * @param root The root of the subtree to be serialized. This could
  45.    *             be any node, including a Document.
  46.    * @returns The serialized subtree in the form of a Unicode string
  47.    */
  48.   /* AString serializeToString (in nsIDOMNode root); */
  49.   NS_IMETHOD SerializeToString(nsIDOMNode *root, nsAString & _retval) = 0;
  50.  
  51.   /**
  52.    * The subtree rooted by the specified element is serialized to
  53.    * a byte stream using the character set specified.
  54.    * @param root The root of the subtree to be serialized. This could
  55.    *             be any node, including a Document.
  56.    * @param stream The byte stream to which the subtree is serialized.
  57.    * @param charset The name of the character set to use for the encoding
  58.    *                to a byte stream.
  59.    */
  60.   /* void serializeToStream (in nsIDOMNode root, in nsIOutputStream stream, in AUTF8String charset); */
  61.   NS_IMETHOD SerializeToStream(nsIDOMNode *root, nsIOutputStream *stream, const nsACString & charset) = 0;
  62.  
  63. };
  64.  
  65. /* Use this macro when declaring classes that implement this interface. */
  66. #define NS_DECL_NSIDOMSERIALIZER \
  67.   NS_IMETHOD SerializeToString(nsIDOMNode *root, nsAString & _retval); \
  68.   NS_IMETHOD SerializeToStream(nsIDOMNode *root, nsIOutputStream *stream, const nsACString & charset); 
  69.  
  70. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  71. #define NS_FORWARD_NSIDOMSERIALIZER(_to) \
  72.   NS_IMETHOD SerializeToString(nsIDOMNode *root, nsAString & _retval) { return _to SerializeToString(root, _retval); } \
  73.   NS_IMETHOD SerializeToStream(nsIDOMNode *root, nsIOutputStream *stream, const nsACString & charset) { return _to SerializeToStream(root, stream, charset); } 
  74.  
  75. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  76. #define NS_FORWARD_SAFE_NSIDOMSERIALIZER(_to) \
  77.   NS_IMETHOD SerializeToString(nsIDOMNode *root, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SerializeToString(root, _retval); } \
  78.   NS_IMETHOD SerializeToStream(nsIDOMNode *root, nsIOutputStream *stream, const nsACString & charset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SerializeToStream(root, stream, charset); } 
  79.  
  80. #if 0
  81. /* Use the code below as a template for the implementation class for this interface. */
  82.  
  83. /* Header file */
  84. class nsDOMSerializer : public nsIDOMSerializer
  85. {
  86. public:
  87.   NS_DECL_ISUPPORTS
  88.   NS_DECL_NSIDOMSERIALIZER
  89.  
  90.   nsDOMSerializer();
  91.  
  92. private:
  93.   ~nsDOMSerializer();
  94.  
  95. protected:
  96.   /* additional members */
  97. };
  98.  
  99. /* Implementation file */
  100. NS_IMPL_ISUPPORTS1(nsDOMSerializer, nsIDOMSerializer)
  101.  
  102. nsDOMSerializer::nsDOMSerializer()
  103. {
  104.   /* member initializers and constructor code */
  105. }
  106.  
  107. nsDOMSerializer::~nsDOMSerializer()
  108. {
  109.   /* destructor code */
  110. }
  111.  
  112. /* AString serializeToString (in nsIDOMNode root); */
  113. NS_IMETHODIMP nsDOMSerializer::SerializeToString(nsIDOMNode *root, nsAString & _retval)
  114. {
  115.     return NS_ERROR_NOT_IMPLEMENTED;
  116. }
  117.  
  118. /* void serializeToStream (in nsIDOMNode root, in nsIOutputStream stream, in AUTF8String charset); */
  119. NS_IMETHODIMP nsDOMSerializer::SerializeToStream(nsIDOMNode *root, nsIOutputStream *stream, const nsACString & charset)
  120. {
  121.     return NS_ERROR_NOT_IMPLEMENTED;
  122. }
  123.  
  124. /* End of implementation class template. */
  125. #endif
  126.  
  127. #define NS_XMLSERIALIZER_CID                        \
  128.  { /* a6cf9124-15b3-11d2-932e-00805f8add32 */       \
  129.    0xa6cf9124, 0x15b3, 0x11d2,                      \
  130.   {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
  131. #define NS_XMLSERIALIZER_CONTRACTID \
  132. "@mozilla.org/xmlextras/xmlserializer;1"
  133.  
  134. #endif /* __gen_nsIDOMSerializer_h__ */
  135.